package com.dxtx.widget;

import android.content.Context;
import android.util.AttributeSet;
import android.widget.GridView;

/**
 * 描述： 实现不能滚动的通用GridView<br/>
 * 和正常的GridView使用类似,主要用于最外面嵌套ScrollView或者是不让GridView滚动的情况
 *
 */
public class UnScrollGridView extends GridView
{
    public UnScrollGridView(Context context, AttributeSet attrs)
    {
        super(context, attrs);
    }
    
    @Override
    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec)
    {
        int expandSep = MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE >> 2, MeasureSpec.AT_MOST);
        super.onMeasure(widthMeasureSpec, expandSep);
    }
}
